#include<iostream>
using namespace std;

int Fenkuai(int length, int width)
{
	if (width == length)
	{
		return width;
	}
	int width1 = length % width;
	return Fenkuai(width, width1);
}
int main()
{
	int length = 100, width = 30;
	cout << Fenkuai(length, width);
	return 0;
}